/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author WinKiQue58
 */
@Embeddable
public class ItemCatalogPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_ITEM_CATALOG")
    private BigInteger idItemCatalog;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_CATALOG")
    private BigInteger idCatalog;

    public ItemCatalogPK() {
    }

    public ItemCatalogPK(BigInteger idItemCatalog, BigInteger idCatalog) {
        this.idItemCatalog = idItemCatalog;
        this.idCatalog = idCatalog;
    }

    public BigInteger getIdItemCatalog() {
        return idItemCatalog;
    }

    public void setIdItemCatalog(BigInteger idItemCatalog) {
        this.idItemCatalog = idItemCatalog;
    }

    public BigInteger getIdCatalog() {
        return idCatalog;
    }

    public void setIdCatalog(BigInteger idCatalog) {
        this.idCatalog = idCatalog;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idItemCatalog != null ? idItemCatalog.hashCode() : 0);
        hash += (idCatalog != null ? idCatalog.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ItemCatalogPK)) {
            return false;
        }
        ItemCatalogPK other = (ItemCatalogPK) object;
        if ((this.idItemCatalog == null && other.idItemCatalog != null) || (this.idItemCatalog != null && !this.idItemCatalog.equals(other.idItemCatalog))) {
            return false;
        }
        if ((this.idCatalog == null && other.idCatalog != null) || (this.idCatalog != null && !this.idCatalog.equals(other.idCatalog))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.ItemCatalogPK[ idItemCatalog=" + idItemCatalog + ", idCatalog=" + idCatalog + " ]";
    }
    
}
